<?php

/*
 * EachGo电商网站 新媒体
 * www.eachgo.cn
 */

namespace Home\Model;

/**
 * SubsidizedStudentInfoModel
 * 请输入描述
 * @author Moon
 */
use Think\Model;

class SubsidizedStudentInfoModel extends Model {
    /*
     * 添加一条记录
     */

    public function addSubsidizedInfo($obj) {
        $res = $this->add($obj);
        return $res;
    }

    /*
     * 删除一条记录
     */

    public function deleteSubsidizedInfo($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->delete();
        return $res;
    }

    /*
     * 更新一条记录
     */

    public function updateSubsidiizedInfo($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->save($obj);
        return $res;
    }

    /*
     * 查询记录by id
     */

    public function selectSubsidizedInfoById($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->select();
        return $res;
    }

    /*
     * 查询记录by 姓名
     */
    public function selectSubsidizedInfoByName($obj) {
        $res = $this->where('student_Name like "%' . $obj['student_Name'] . '%"')->select();
        return $res;
    }

}
